package router

import (
	"context"
	"github.com/gogf/gf/v2/net/ghttp"
	"server/internal/controller/admin"
	"server/internal/middleware"
)

func Admin(ctx context.Context, group *ghttp.RouterGroup) {
	//全局_后置中间件
	g := group.Group("/admin")

	g.Middleware(
		middleware.ResponseHandler,
		middleware.AdminAuthHandler,
	)

	g.Bind(
		// 系统基础模块
		admin.NewSystem(),
		// 教学课程模块
		admin.NewLesson(),
	)
}
